// 车辆管理 - 裸车验车入库
import { pget, ppostJson, postFileByFormData } from '@/utils/req';
import { modalApi } from '@/utils/modalReq';

// 裸车验车入库单列表
export function getTableList(query: any) {
  return pget(`${modalApi.carMessage}/assetsbarewarehousing/page`, query);
}

// 入库计划单新增
export function addInspection(data: any) {
  return ppostJson(`${modalApi.carMessage}/assetsbarewarehousing/save`, data);
}

// 入库计划单编辑
export function editInspection(data: any) {
  return ppostJson(`${modalApi.carMessage}/assetsbarewarehousing/update`, data);
}

// 查看入库计划单信息
export function viewInspection(query: any) {
  return pget(`${modalApi.carMessage}/assetsbarewarehousing/detail`, query);
}

// 获取入库车辆接口
export function getCarPage(query?: any) {
  return pget(
    `${modalApi.carMessage}/assetsbarewarehousing/getCarPage`, query
  );
}

// 裸车导入验证
export const checkBareCar = `${modalApi.carMessage}/assetsbarewarehousing/import/checkBareCar`;

// 裸车确认导入
export function importBareCar(data: any) {
  return postFileByFormData(
    `${modalApi.carMessage}/assetsbarewarehousing/importBareCar`,
    data,
  );
}

// 裸车导入获取错误数据
export function paabeegr(query: any) {
  return pget(
    `${modalApi.carMessage}/assetsaccidentdataprocessing/barePage`,
    query,
  );
}
